# # 练习：https://ebank.xacbank.com/XAEIBankDemo/page/login/login.html?t=1679974008665
# #
# #  西安银行，密码123456，登录后
# # 西安银行->转行汇款->行内批量转账
# # 设置某个付款账户，不使用默认值
# # 选择收款人，从里面选择赵云、马超
# # 设置收款人的转账金额分别为1000、2000
# # 点击下一步
# # 点击提交
#
import time
from time import sleep

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait
#
d = webdriver.Edge()
d.get("https://ebank.xacbank.com/XAEIBankDemo/page/login/login.html?t=1679974008665")
# time.sleep(1)
# #登陆
# d.find_element(By.ID,'account').send_keys('123456')
# d.find_element(By.ID,'login').click()
# time.sleep(2)
# #点×
# locator1 = ("id","fw-gen-10009-closable")
# input1 = WebDriverWait(d,5,0.5).until(expected_conditions.presence_of_element_located(locator1))
# d.find_element(By.ID,'fw-gen-10009-closable').click()
# #西安银行->转行汇款->行内批量转账
# locator2 = ("class name","title_icon.icon-menu2")
# input2 = WebDriverWait(d,5,0.5).until(expected_conditions.presence_of_element_located(locator2))
# d.find_element(By.CLASS_NAME,'title_icon.icon-menu2').click()
# locator3 = ("link text","行内批量转账")
# input3 = WebDriverWait(d,5,0.5).until(expected_conditions.presence_of_element_located(locator3))
# d.find_element(By.LINK_TEXT,'行内批量转账').click()
#
#
# # 设置某个付款账户，不使用默认值
# locator4 = ("id","fw-gen-10007-body")
# input4 = WebDriverWait(d,5,0.5).until(expected_conditions.presence_of_element_located(locator4))
# iframe=d.find_element(By.ID,'fw-gen-10007-body')
# d.switch_to.frame(iframe)
# time.sleep(2)
# a=d.find_element(By.ID,'payAccount')
# s=Select(a)
# s.select_by_value('781011590000001040')
#
# # 选择收款人，从里面选择赵云、马超
# d.find_element(By.ID,'icon_find1').click()
# d.switch_to.default_content()
#
# iframe2=d.find_element(By.ID,'fw-gen-10011-iframe')
# d.switch_to.frame(iframe2)
# #选择点击
# a1=(By.XPATH,'//*[@id="fw-gen-10001-tbody"]/tr[2]/td[1]/label')
# a2=WebDriverWait(d,5,0.5).until(expected_conditions.element_to_be_clickable(a1))
# a2.click()
# a3=(By.XPATH,'//*[@id="fw-gen-10001-tbody"]/tr[3]/td[1]/label')
# a4=WebDriverWait(d,5,0.5).until(expected_conditions.element_to_be_clickable(a3))
# a4.click()
# d.switch_to.default_content()
# #确定
#
# d.find_element(By.CLASS_NAME,'btn.btn-primary').click()
# time.sleep(2)
#
# #输入金额
#
# d.switch_to.frame(d.find_element(By.ID,'fw-gen-10007-body'))
# d.find_element(By.XPATH,'//*[@id="tbody_1"]/tr[1]/td[4]/input').send_keys("1000")
# d.find_element(By.XPATH,'//*[@id="tbody_1"]/tr[2]/td[4]/input').send_keys("2000")
# #下一步
#
# d.find_element(By.ID,'next_btn').click()
# time.sleep(2)
# #输入模板名
# d.find_element(By.ID,'batchTempName').send_keys('20250829')
# #提交
# d.find_element(By.ID,'submit_btn').click()
# #截图
# time.sleep(5)
# timestr = time.strftime("%Y-%m-%d_%H-%M-%S",time.localtime())
# d.get_screenshot_as_file(f"d:\\{timestr}.png")
# time.sleep(5)
d.find_element()


